Add Dockerfile and entrypoint for container deployment#41
Add Dockerfile and entrypoint for container deployment#41Bekkie merged 2 commits intoAmpScm:mainfrom
Conversation
Provides an official container option using python:3.12-slim with local source install, non-root user, persistent /data volume, and env-driven configuration. Includes forward-compatible accessory support (PR AmpScm#40).
Add Method 4 (Docker/Podman) section with build, pairing, and environment variable docs. Remove "Add Docker support" from future work.
|
Looks good to me, after merging #40 will merge this one. |
|
Thanks! |
|
Will this become available on Docker Hub? That would make installing it on a NAS a lot simpler. |
|
There already seems to be a version of tadolocal on Docker Hub: |
|
I added build and push CI to my fork. So whenever I update it, you'll find hosted images at quay.io/john_johansson/tadlocal - I will keep this public until this project implement its own official registry. You can pull either latest, a specific version or a branch: |
|
Thanks! |
|
Most likely due to the fact that the container is running with a unprivliged UID and not as root. To accomdate for this, you'd have to modify the Dockerfile and build your own container image. |
Summary
Dockerfile(python:3.12-slim, non-root, multi-arch) andentrypoint.shwith env-var-driven configuration, persistent pairing DB via/datavolume, and forward-compatible accessory support for PR Add standalone HomeKit accessory support (e.g. Smart AC Control V3+) #40.dockerignoreto keep images leanINSTALLATION.mdwith "Method 4: Container (Docker/Podman)" section covering build, first-time pairing, subsequent runs, and environment variables; remove "Add Docker support" from Future WorkDetails
The entrypoint handles three scenarios:
TADO_BRIDGE_IPandTADO_BRIDGE_PINTADO_BRIDGE_IPneeded (pairing DB persisted in volume)Uses
execto replace the shell so signals propagate correctly to thetado-localprocess.Relates to #6
Relates to #12
Test plan
docker build -t tado-local .succeeds on AMD64podman build -t tado-local .succeeds on ARM64TADO_BRIDGE_IPis set/datavolume